With the development of communications, the mobile Internet has been widely applied. Typically, pictures are displayed on a web page received wirelessly in the mobile Internet. At present, pictures are displayed on the web page received wirelessly in the following two picture display solutions.
In a first picture display solution where a picture will not be buffered, the browser sends a picture acquisition request for each picture to a server, upon detection of each event where a user opens or refreshes a web page. This solution has a disadvantage that a certain amount of network traffic, which is very precious for the user of the mobile Internet, is required for the picture each time the user accesses the same web page. Additionally, some response time is taken by the mobile terminal to request a picture from the server, especially in a 2G or 3G wireless network environment, thus the display of the picture is delayed, which greatly degrades the display effect of the web page received wirelessly in the mobile Internet.
In a second picture display solution, a picture is converted into a base 64-encoded character string through HTML5 canvas technologies and buffered in a local storage (e.g. localStorage). Due to the limited space of the local storage, the outdated buffered pictures will be removed from the local storage by periodically emptying the buffers in the local storage to release the space of the local storage, for the purpose of new buffering operations. In this solution, although a picture is buffered in the local storage, all buffers in the local storage needs to be emptied to remove the outdated buffered pictures, for the purpose of new buffering operations. In this solution, the buffering efficiency and the usage of buffers in the local storage are low, because valid buffer records are cleaned at the same time. Additionally, it is difficult to determine the cleaning period of the local storage, because if the cleaning period is too short, the usage of the buffered pictures will be lowered, and if the cleaning period is too long, the validity of the buffered pictures will be lowered.